/*
 * Copyright (c) Ulrich Hilger, http://dev.uhilger.de, all rights reserved.
 *
 * Published under the terms and conditions of the Apache License 2.0,
 * see http://www.apache.org/licenses/LICENSE-2.0
 */

package de.uhilger.servicehub.model;

/**
 *
 * @author Ulrich Hilger, <a href="http://dev.uhilger.de" target="_blank">http://dev.uhilger.de</a>
 * @author Published under the terms and conditions of
 * the <a href="http://www.apache.org/licenses/LICENSE-2.0" target="_blank">Apache License 2.0</a>
 */
public interface DatabaseServer {

  /**
   * Shutdown the database server
   */
  void shutdown();

  /**
   * Start database server
   */
  void start(int port);

  /**
   * Try to test for a connection
   * Throws exception if unable to get a connection
   */
  void testForConnection() throws Exception;

  /**
   * trace utility of server
   *
   * @param onoff  true to switch on, false to switch off
   */
  void trace(boolean onoff);

  /**
   * Get information about the database server
   * @return   database server information
   */
  public String getDatabaseServerInfo();
}
